<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%><%@page import="com.zpyr.mvc.vo.Carc_user_info"%><%@page import="java.lang.reflect.Method"%><%@page import="com.zpyr.mvc.vo.Carc_category_info"%><%@page import="java.util.List"%><%@page import="com.zpyr.common.StringUtil"%><%
%>
<%
	response.setHeader("Access-Control-Allow-Origin", "*");
%>
[
<%
	List<Carc_category_info> list = (List<Carc_category_info>) request.getAttribute("category_list");
	if(list != null) {
		String tagName = "";
		Object value = "";
		boolean outerSt = true , innerSt = true;
		for( Carc_category_info ci : list ) {
%><%if(!outerSt){%>,<%}%>
{<%
			Method[] ms = ci.getClass().getDeclaredMethods();
			innerSt = true;
			for( Method m : ms ) {
				tagName = m.getName().substring(3).toLowerCase();
				if(m.getName().startsWith("get") && m.getGenericParameterTypes().length == 0 ) {
					
					value = m.invoke(ci , null);
					value = value == null? "" : value;
					
					value = StringUtil.textTOhtml( value.toString() );
					
%><%if(!innerSt){%>,<%}%><%=tagName %>: '<%=value %>'<%
				}
				innerSt = false;
			}
			outerSt = false;
%>}
<%
		}
	}
%>
]